/*
 * mainwindow.h
 *
 *  Created on: 08.09.2008
 *      Author: Fedot
 */

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QWidget>

class QListWidget;
class QToolButton;
class QAction;
class QLabel;
class QProgressBar;
class QVBoxLayout;
class QHBoxLayout;
class QMenu;
class QProgressBar;

class MainWindow : public QWidget
{
	Q_OBJECT

public:
	MainWindow();

private slots:
	void changeStatusToOnline();
	void changeStatusToOffline();
/*	void changeStatusToAway();
	void changeStatusToFreedom();
	void changeStatusToNotdisturb();
	void changeStatusToBusy();
	void changeStatusTodifficult();*/

private:
	void createContextMenu();
	void createContactList();
	void createActions();
	void createMenu();
	void createButton();

	void readSetting();
	void writeSetting();

	QVBoxLayout *mainLayout;
	QHBoxLayout *nizMenu;

	QListWidget *contactList;

	QToolButton *statusButton;
	QToolButton *visibleStatus;
	QToolButton *mainMenu;

	QProgressBar *progress;

	QMenu *mainContextMenu;
	QMenu *statusContextMenu;

	QAction *onlineStatus;
	QAction *offlineStatus;
	QAction *freeStatus;
	QAction *awayStatus;

	QAction *allVisible;
	QAction *unVisible;

	QAction *exitAction;
	QAction *aboutAction;

private:
	void closeEvent(QCloseEvent *event);
};

#endif /* MAINWINDOW_H_ */
